<div id="appData_1"></div>
<div id="appData_2"></div>
<div id="appData_3"></div>

<script type="text/javascript">
function <? echo $data_response->getJSFunction()->getName() ?>(<? echo $data_response->getJSFunction()->getArgs() ?>) 
{
  <?php echo $data_response->getData($viewer_request); ?>
  <?php echo $data_response->getData($fetchViewerData_request); ?>
  document.getElementById('appData_1').innerHTML = "My AppField1 data is: " + <?php echo $app_data1->getAppData(); ?> + "<br />";
  document.getElementById('appData_2').innerHTML = "My AppField2 data is: " + <?php echo $app_data2->getAppData(); ?> + "<br />";
  document.getElementById('appData_3').innerHTML = "My AppField3 data is: " + <?php echo $app_data3->getAppData(); ?> + "<br />";
}
</script>